import { connect } from "react-redux";
import { Button } from "tdesign-react";
import { ViewListIcon } from "tdesign-icons-react";
import { updateCollapse } from "@/redux/modules/menu/action";
const OperationMenu = (props: any) => {
	const { isCollapse, updateCollapse } = props;
	const setMenuCollapse = () => {
		updateCollapse(!isCollapse);
	};
	return <Button variant="text" shape="square" icon={<ViewListIcon />} onClick={setMenuCollapse}></Button>;
};

const mapStateToProps = (state: any) => state.menu;
const mapDispatchToProps = { updateCollapse };
export default connect(mapStateToProps, mapDispatchToProps)(OperationMenu);
